/**
*      author: Y_Yao
*      created: 2024-11-10 21:37:23
**/

#include<bits/stdc++.h>

using namespace std;
using LL = long long;
const LL LLINF = 1e18;
const int INF = 0x3f3f3f3f;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    double n,m,a;
    cin >> n >> m >> a;
    double tn = n / a;
    if(tn > (int)(n/a))
    {
        tn = (int)(n/a) + 1;
    }
    double tm = m / a;
    if(tm > (int)(m/a))
    {
        tm = (int)(m/a) + 1;
    }

    cout << (LL)(tm * tn) << endl;
    return 0;
}